from typing import List


class EmpInfo(object):
    """
    pip install pymysql
    pip install DBUtils
    员工实体
    """
    id: int = None
    name: str = None

    def __init__(self, **kwargs):
        self.id = kwargs["id"]
        self.name = kwargs["name"]

    @staticmethod
    def convert_list(param_list=[]) -> List:
        datalist = []
        for item in param_list:
            emp_info = EmpInfo(**item)
            datalist.append(emp_info)
        return datalist

    def __str__(self):
        return "id:" + str(self.id) + ", name:" + self.name

